/***************************************************************************
 *   Copyright (C) 2007 by Sebastian Bilski, Lance Cooper, Jeff Rebacz,
 *   									and Alex Zelenskiy
 *   sbilski@iit.edu
 *   lance.m.cooper@gmail.com
 *   jeff.rebacz@gmail.com
 *   voiceofanarchy@gmail.com
 *
 *	This file is part of connect3
 *
 *   connect3 is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License, version 2,
 *    as published by the Free Software Foundation
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the
 *   Free Software Foundation, Inc., 
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
 ***************************************************************************/

import java.awt.Color;


public class GamePiece {
	
	private int x;
	private int y;
	private Color color;	
	private Player p;
	
	
	
	public GamePiece(int x, int y, Color color) {
		super();
		setX(x);
		setY(y);
		setColor(color);
	}
	
	public GamePiece() {
		super();
		p=new Player();
		color=p.getColor();
	}



	public Color getColor() {
		return color;
	}
	public void setColor(Color color) {
		this.color = color;
	}
	public Player getP() {
		return p;
	}
	public void setP(Player p) {
		this.p = p;
	}
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
		if(this.x<0){
			this.x=0;
			System.err.println("GamePiece x coordinate <0");
		}
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
		if(this.y<0){
			this.y=0;
			System.err.println("GamePiece y coordinate <0");
		}
	}

}
